<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">

<title>电子文档系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="view/jquery/jquery-1.9.1.js"></script>
<script type="text/javascript" src="view/bootstrap/js/bootstrap.js"></script>
<link rel="stylesheet" href="view/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="view/css/docMan.css">
<link rel="stylesheet" href="view/css/font-awesome.min.css">
<link rel="stylesheet" href="view/css/buttons.css">
<link rel="stylesheet" href="view/css/searchInput.css">
<link rel="stylesheet" href="view/toastr/toastr.css">
<link rel="stylesheet" href="view/datapicker/need/laydate.css">
<link rel="stylesheet" href="view/datapicker/skins/molv/laydate.css">
<script type="text/javascript" src="view/js/docMan.js"></script>
<script type="text/javascript" src="view/datapicker/laydate.js"></script>
</head>
<body style="background: #EDEFF0;">
	<div id="main-container" class="container"
		style="height: 100%;width:100%;background: #ffffff">
		<!-- <div class="row" style="padding-top: 10px;">
			<div class="col-md-3" style="float: right;">
				<a class=" btn_link" href="gwll.action" target="_blank">公文浏览</a>
				<a class=" btn_link" href="zcfg.action" target="_blank" style="margin-left: 10px;">政策法规</a>
				<a class=" btn_link" href="zywj.action" target="_blank" style="margin-left: 10px;">重要文件</a>
			</div>
		</div> -->
		<div class="row mt_10"
			style="height:98%;width: 100%;min-height: 900px;">
			<!-- <img class="img-responsive" src="/DocMan/logo.jpg" alt=""
				style="margin-left: 40%;width: 330px;"> -->
			<form id="searchForm" action="pageSearchNoLogin.action" method="post"
				style="width:100%;margin-top:0%;padding-left: 0%">
				<div style="width:50%;margin-left:20%;">
					<div class="jq22-search-form">
				        <div id="search-bd" class="search-bd">
				            <ul>
				                <li value="0" class="selected">全文</li>
				                <li value="1" class="">标题</li>
				                <li value="2" class="">文号</li>
				            </ul>
				        </div>
				        <div id="search-hd" class="search-hd">
				            <div class="search-bg"></div>
				            <input type="text" id="s2" class="search-input" name="pageLucene.searchText" value='' style="display: inline-block;padding: 17px 5px;">
				            <span class="s1 pholder" style="display: inline;"></span>
				            <span class="s2 pholder" style="display: none;"></span>
				            <span class="s3 pholder" style="display: none;"> </span>
				            <button id="btn_search" class="btn-search" value="搜索"style="font-size:14px;font-family:'Microsoft YaHei';">搜索</button>
				      	<input type="hidden" name="pageLucene.isPage" value='<s:property value="pageLucene.isPage" />' >
				        </div>
				    </div>
				</div>
				<!-- <div style="width:50%;margin-left:25%;">
					<input type="text" class="form-control" name="pageLucene.searchText" value='' placeholder="请输入标题，文号或者文章内容"
						style="width: 80%;display: inline;">
						<input type="hidden" id="searchType" value="0" name="pageLucene.searchType" >
					<button style="width:80px;" class="btn btn-primary btn-search-title"
						type="button" id="btn_title_search">标题搜索</button>
						<button style="width:80px;" class="btn btn-primary btn-search"
						type="button" id="btn_all_search">全文搜索</button>
				</div> -->
				<input type="hidden" id="searchType" value="0" name="pageLucene.searchType" >
				<div  style="width:50%;margin-left:20%; ">
					<h5 style="cursor: pointer;" id="high_search">高级<span id="icon" class="glyphicon glyphicon-chevron-right" style="color:#BABABB;margin-left:3px;" aria-hidden="true"></span></h5>
				</div>
				<div id="div_time" style="margin-left:20%;width:75%;padding: 1px 0px;display:none; ">
					按收文时间：<input name="pageLucene.startDate"
						class="form-control laydate-icon" id="startDate"
						style="margin-right:10px;margin-left:10px;padding:3px 4px;font-size:13px;width:140px;display:inline;height:30px;" />至<input
						 value='' name="pageLucene.endDate" id="endDate"
						class="form-control laydate-icon"
						style="margin-left:10px;padding:3px 4px;font-size:13px;width:140px;display:inline;height:30px;" />
					<%-- 年度<select class="form-control "
						style="display:inline;width:80px;font-size:13px;" id="nd">
					</select>  --%><%-- 搜索范围<select class="form-control" name="pageLucene.indexFrom"
						style="width:100px;display:inline;margin:5px;height:30px;font-size:13px;">
						<option value="-1">不限范围</option>
						<option value="0">电子文档库</option>
						<option value="1">OA库</option>
					</select> --%><button class="btn btn-primary" type="button" id="timeclear">清空</button>
					
				</div>
				<div id="div_lwdw" style="margin-left:20%;width:75%;display:none; ">
					<div class="row" style="margin-bottom:10px; margin-left: 0px;margin-top: 10px;">
						<!-- <input  type="checkbox" id="islwdwsearch"  style="margin-right:10px;float:left;display: inline;margin-top: 10px;"> -->
						<input  type="hidden" id="inputlwdw" name="pageLucene.islwdwSearch" value="false"  >
						<input  type="hidden" id="lwdwStr" name="pageLucene.lwdw" value="false"  >
						<!-- <h5 style="display: inline;margin-right: 10px;float:left;display: inline;">来文单位:</h5> -->
						<input  type="hidden" id="mutilLwdw" name="pageLucene.MutilLwdw" value="false" >
						<div class="col-md-8" style="padding: 0px;">
							<div style="float: left;display:inline;height40px;line-height: 2.5">按来文单位：</div>
							<div style="float:left;display: inline;height:40px;border-left: 3px solid #CEE4F7;padding:5px 12px;"><input  type="checkbox" id="bj" name="lwdwradio" value="国土资源部" style="margin-right:10px;"><label for="bj">国土资源部</label></div>
							<div style="float:left;display: inline;height:40px;border-left: 3px solid #CEE4F7;padding:5px 12px;"><input  type="checkbox" id="sj" name="lwdwradio" value="省国土资源厅" style="margin-right:10px;"><label for="sj">省厅</label></div>
							<div style="float:left;display: inline;height:40px;border-left: 3px solid #CEE4F7;padding:5px 12px;"><input  type="checkbox" id="shizf" name="lwdwradio" value="宁波市政府集合" style="margin-right:10px;"><label for="shij">市政府</label></div>
							<div style="float:left;display: inline;height:40px;border-left: 3px solid #CEE4F7;padding:5px 12px;"><input  type="checkbox" id="shij" name="lwdwradio" value="宁波市国土资源局" style="margin-right:10px;"><label for="shij">市局</label></div>
							<div style="float:left;display: inline;height:40px;border-left: 3px solid #CEE4F7;padding:5px 12px;"><input  type="checkbox" id="qt" name="lwdwradio" value="其他" style="margin-right:10px;"><label for="qt">其他</label></div>
							<input  type="hidden" id="lwdwb" name="pageLucene.lwdwb" value="0" style="margin-right:10px;">
							<select class="form-control" id="qtlwdw" 
								style="width:150px;display:none;margin:5px;height:35px;font-size:13px;">
								<option value="市级机关">市级机关</option>
								<option value="宁波市人民政府">宁波市人民政府</option>
								<option value="市委">市委</option>
								<option value="县区级来文件">县区级来文件</option>
								<option value="市政府承办单">市政府承办单</option>
								<option value="省政府">省政府</option>
								<option value="中央、中央办公厅">中央、中央办公厅</option>
								<option value="省委">省委</option>
								<option value="宁波市发展和改革委员会">宁波市发展和改革委员会</option>
								<option value="国务院">国务院</option>
								<option value="其他">其他</option>
							</select>
						</div>
					</div>
					<div class="row" style="margin-left:20px;margin-bottom:10px; margin-top: 10px;">
						搜  索  范  围：<select class="form-control" name="pageLucene.indexFrom"
						style="width:100px;display:inline;margin:5px;height:34px;font-size:13px;">
						<option value="-1">不限范围</option>
						<option value="0">电子文档库</option>
						<option value="1">OA库</option>
					</select>
					</div>
				</div>
				<input type="hidden" name="pageLucene.currentPage" value="1">
			</form>
			<%-- <span class="button-wrap" style="margin-left:37%;margin-top:10%;position:absolute;">
				<a href="myFiles.action"
				class="button button-pill button-glow button-primary">我的文档</a>
			</span> <span class="button-wrap" style="margin-left:55%;margin-top:10%;position:absolute;">
				<a href="index.action" class="button button-pill  button-glow">国土网盘</a>
			</span> --%>
		</div>
	</div>
</body>
</html>

<script type="text/javascript">
		laydate.skin('molv');
		laydate({elem:'#startDate'});
		laydate({elem:'#endDate'});
		$(function(){
			/* $("#btn_title_search").on("click",function(){
				$("#searchType").val("1");
				lwdw();
				$("#searchForm").submit();
			});
			$("#btn_all_search").on("click",function(){
				$("#searchType").val("0");
				lwdw();
				$("#searchForm").submit();
			}); */
			
			$("#btn_search").on("click",function(){
				searchType();
				lwdw();
				//$("#searchForm").submit();
			});
			$("#timeclear").on("click",function(){
				$("#startDate").val("");
				$("#endDate").val("");
			})
			$("#high_search").on("click",function(){
				$("#div_time").toggle(500);
				$("#div_lwdw").toggle(500);
				console.info($("span .glyphicon").hasClass("glyphicon-chevron-down"));
				if($("#icon").hasClass("glyphicon-chevron-right")){
					$("#icon").removeClass("glyphicon-chevron-right");
					$("#icon").addClass("glyphicon-chevron-down");
				}else{
					$("#icon").removeClass("glyphicon-chevron-down");
					$("#icon").addClass("glyphicon-chevron-right");
				}
			})
			$("[name='lwdwradio']").on("click",function(){
				var is_selected=$(this).is(':checked');
				var id=$(this).attr("id");
				$("[name='lwdwradio']").each(function(i,ele){
					if(id!=$(this).attr("id")){
						$(this).attr("checked",false);
					}
				});
				if(id=="qt"){
					if($("#qtlwdw").css('display')!="block"){
						$("#qtlwdw").toggle(300);
					}
				}else{
					if($("#qtlwdw").css('display')=="block"){
						$("#qtlwdw").toggle(300);
					}
				}
				console.info($("#"+id).is(':checked'));
			})
		});
		function searchType(){
			var d=$(".selected");
			console.info($(d).val());
			$("#searchType").val($(d).val());
			console.info($("#searchType").val());
		}
		function lwdw(){
			$("#inputlwdw").val("false");
			var lwdw="";
			$("[name='lwdwradio']").each(function(i,ele){
					if($(ele).is(":checked")){
						$("#inputlwdw").val("true");
						lwdw=$(ele).val();
					}
			});
			if(lwdw=="宁波市政府集合"){
				$("#mutilLwdw").val("true");
			}else{
				$("#mutilLwdw").val("false");
			}
			if(lwdw=="其他"){
				lwdw=$("#qtlwdw").val();
			}
			$("#lwdwStr").val(lwdw);
			
			console.info(lwdw);
		}
		
        $(function(){
            //通用头部搜索切换
            $('#search-hd .search-input').on('input propertychange',function(){
                var val = $(this).val();
                if(val.length > 0){
                    $('#search-hd .pholder').hide(0);
                }else{
                    var index = $('#search-bd li.selected').index();
                    $('#search-hd .pholder').eq(index).show().siblings('.pholder').hide(0);
                }
            })
            $('#search-bd li').click(function(){
                var index = $(this).index();
                $('#search-hd .pholder').eq(index).show().siblings('.pholder').hide(0);
                $('#search-hd .search-input').eq(index).show().siblings('.search-input').hide(0);
                $(this).addClass('selected').siblings().removeClass('selected');
                /* $('#search-hd .search-input').val(''); */
            });
        })
    
</script>
